Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Read  Arguments  from  an  Active  Directory  Container  

 Content of Read Arguments from an Active Directory Container.vbs
MD5 Hash: 391F0DE16339CF8FBC87F0BB02DD3667
' Description: Demonstration script that retrieves the names of all the computers in an Active Directory container, and then returns service information from each of those computers.


Set objDictionary = CreateObject("Scripting.Dictionary")

i = 0
Set objOU = GetObject("LDAP://CN=Computers, DC=fabrikam, DC=com")
objOU.Filter = Array("Computer")

For Each objComputer in objOU
objDictionary.Add i, objComputer.CN
i = i + 1
Next

For Each objItem in objDictionary
Set colServices = GetObject("winmgmts://" & _
objDictionary.Item(objItem) _
& "").ExecQuery("Select * from Win32_Service")
Wscript.Echo colServices.Count
Next

   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a